//
//  CXHomeHotNetManager.m
//  XiMaFM
//
//  Created by hcios on 2017/9/2.
//  Copyright © 2017年 hcios. All rights reserved.
//

#import "CXHomeHotNetManager.h"
#import "CXHotModel.h"
#import "CXBroadcastModel.h"


//? 号前网址
#define kHomeURLPath @"http://mobile.ximalaya.com/mobile/discovery/v1/recommends"

#define kBroadURLPath @"http://live.ximalaya.com/live-web/v4/homepage?device=iPhone"

#define KURLChannel @"channel":@"and-f5"
#define kURLDevice @"device":@"ios"
#define kURLActivity @"includeActivity":@"true"
#define kURLSpecial @"includeSpecial":@"true"
#define kURLScale @"scale":@2
#define kURLVersion @"version":@"4.3.26.2"

@implementation CXHomeHotNetManager

//http://mobile.ximalaya.com/mobile/discovery/v3/recommend/ts-1504704434832?appid=0&categoryId=-2&channel=ios-b1&code=43_320000_3201&device=iPhone&deviceId=E99AF40E-0260-4158-9CB9-1B753A136C20&includeActivity=true&includeSpecial=true&network=WIFI&operator=3&scale=2&uid=0&version=6.3.15


//channel=and-f5&device=ios&includeActivity=true&includeSpecial=true&scale=2&version=4.3.20.2
+ (id)getHomePageIntroduceCompletionHandle:(void (^)(id, NSError *))completed {
    
    return [self GET:kHomeURLPath parameters:@{KURLChannel,kURLDevice,kURLActivity,kURLSpecial,kURLScale,kURLVersion} complationHandle:^(id responseObject, NSError *error) {
        completed([CXHotModel mj_objectWithKeyValues:responseObject],error);
    }];
}


//获取广播信息
//http://live.ximalaya.com/live-web/v4/homepage?device=iPhone
+ (id)getRankPageCompletionHandle:(void(^)(id responseObject, NSError *error))completed {
    return [self GET:kBroadURLPath parameters:nil complationHandle:^(id responseObject, NSError *error) {
        completed([CXBroadcastModel mj_objectWithKeyValues:responseObject],error);
    }];
}

@end

